<cpanel include="../../config.php">

<?

/***************************************************************************
 *                                 subdomains_setup_redirect.php
 *                            -------------------
 *   Begin                : Thursday, April 16, 2005
 *   Copyright            : (C) 2005 Point and Code
 *   Domain               : http://www.pointandcode.com/
 *   Email                : support@pointandcode.com
 *   Version              : 1.0.0
 *
 ***************************************************************************/

/***************************************************************************
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 ***************************************************************************/

$html_root_path = '../../';
include $root_path.'common.php';
$page_title = $lang['subdomains_redirect'];
include $root_path.'page_header.php';


$template->set_filenames(array(
	'body' => $root_path.$template_path.'domains/subdomains_setup_redirect.tpl')
);

$domain = <<<EOFpacman
<cpanel print="$FORM{'domain'}">
EOFpacman;

$subdomain = <<<EOFpacman
<cpanel sprint="$FORM{'domain'},_,0">.<cpanel sprint="$FORM{'domain'},_,1">
EOFpacman;

$subdomain_url = <<<EOFpacman
<cpanel SubDomain="subdomainurl($FORM{'domain'})">
EOFpacman;

// If the subdomain is currently not set, then say so - don't just output http:// !
if ($subdomain_url == "http://") {
	$s_subdomain_url = "";
	$subdomain_url = "nowhere";
} else {
	$s_subdomain_url = $subdomain_url;
};

$template->assign_vars(array(
	'U_ACTION' => 'subdomains_setup_redirect_done.php',
	'DOMAIN' => $domain,
	'SUBDOMAIN' => $subdomain,
	'SUBDOMAIN_URL' => $subdomain_url,
	'S_SUBDOMAIN_URL' => $s_subdomain_url,
	
	'L_SUBDOMAINS' => $lang['subdomains'],
	'L_SUBDOMAINS_REDIRECT' => $lang['subdomains_redirect'],
	'L_INTRO' => sprintf($lang['subdomains_redirect_intro'], $subdomain, $subdomain_url),
	'L_URL' => $lang['url'],
	'L_HINT' => sprintf($lang['addon_domains_redirect_hint'], $subdomain),
	'L_UPDATE_REDIRECT' => $lang['update_redirect'],

	)
);

//
// Woohoo! All done!
//
$template->pparse('body');




include $root_path.'page_tail.php';




?>